package com.jingtao.product.service.impl;

import com.jingtao.product.domain.DTO.MemberLevel;
import com.jingtao.product.domain.DTO.MemberLevelExample;
import com.jingtao.product.mapper.MemberLevelMapper;
import com.jingtao.product.service.MemberLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 会员等级管理Service实现类
 * Created by macro on 2018/4/26.
 */
@Service
public class MemberLevelServiceImpl implements MemberLevelService {
    @Autowired
    private MemberLevelMapper memberLevelMapper;
    @Override
    public List<MemberLevel> list(Integer defaultStatus) {
        MemberLevelExample example = new MemberLevelExample();
        example.createCriteria().andDefaultStatusEqualTo(defaultStatus);
        return memberLevelMapper.selectByExample(example);
    }
}
